package list.ittest.work.D_Dao;

import list.ittest.work.E_Domain.Student;

import java.util.ArrayList;

public class StudentDao {
    ArrayList<Student>list = new ArrayList<>();



    public void addStudent(Student stu) {
        list.add(stu);
    }

    public ArrayList<Student> lookStudent() {
        return  list;
    }


    public void deleteStudent(int i) {
        list.remove(i);
    }

    public void updateStudent(int i, Student s) {
        Student stu = list.get(i);
        stu.setName(s.getName());
        stu.setAge(s.getAge());
        stu.setBirthday(s.getBirthday());
    }
}
